Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: filters and filter factory #2914

Merged
merged 9 commits into from
Dec 9, 2024

Conversation

dennisrijsdijk
Copy link
Collaborator

Requires changes to custom-scripts-types

Description of the Change

  • Refactor event filters to typescript
  • Update filter factory
    • Allow create*Filter functions to accept a predicate for eventMetaKey
    • Allow eventMetaKey to contain property paths
    • Add createPresetFilter function to streamline filters with static or dynamic preset values
    • Add extra comparison types (eg. Doesn't Contain, Starts With, Doesn't Match Regex)
  • Move most existing filters to filter factory

Applicable Issues

#2850 Loosely Related

Testing

  • Ensured bot still starts
  • Ensured filters still properly populate inside of events
  • Tested functionality of filters that don't require monetary action and/or an affiliate channel

@ebiggz ebiggz enabled auto-merge (squash) December 9, 2024 00:13
@ebiggz ebiggz merged commit 0741031 into crowbartools:v5 Dec 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants